﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using DongleManage.Model.BaseClass;
using System.ComponentModel;
using System.Data;

namespace DongleManage.Model.Common
{
    [DataContract]
    public class DictValueEntity : BaseEntity
    {
        /// <summary>
        /// 主键
        /// </summary>
        [DataMember]
        [DisplayName("主键")]
        public int TransactionNumber { get; set; }


        /// <summary>
        /// 字典编码
        /// </summary>
        [DataMember]
        [DisplayName("字典编码")]
        public string Dict { get; set; }

        /// <summary>
        /// 字典值
        /// </summary>
        [DataMember]
        [DisplayName("字典值")]
        public string Value { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [DataMember]
        [DisplayName("备注")]
        public string  ContentText { get; set; }


        public DictValueEntity(IDataReader dataReader)
            : base(dataReader)
        {
            TransactionNumber = Convert.IsDBNull(dataReader["TransactionNumber"]) ? 0 : int.Parse(dataReader["TransactionNumber"].ToString());
            Dict = Convert.IsDBNull(dataReader["Dict"]) ? "" : dataReader["Dict"].ToString();
            Value = Convert.IsDBNull(dataReader["Value"]) ? "" : dataReader["Value"].ToString();
            ContentText = Convert.IsDBNull(dataReader["ContentText"]) ? "" : dataReader["ContentText"].ToString();
        }

    }
}
